package com.service;

import com.dao.GoodsDao;
import com.dto.BaseDto;
import com.entity.Goods;
import com.page.PageInfo;

import javax.annotation.Resource;
import java.util.List;

public interface GoodsService {

    public Goods getByGid(String gid);
    public BaseDto<Goods> getAll();
    public BaseDto<Goods> getAllByPage(PageInfo pageInfo);

    public BaseDto<Goods> searchNameByPage(PageInfo pageInfo,String adname);

    /**
     * 根据主键查询
     * @param adid
     * @return
     */
    public BaseDto getGoodsByGid(String gid);

    /**
     * 添加一个实体
     * @param goods
     * @return
     */
    public BaseDto addGoods(Goods goods);
    /**
     * 修改实体
     */
    public BaseDto updateGoods(Goods goods);
    public BaseDto updateGoodsByExample();

    /**
     * 删除一个实体
     * @param gid
     * @return
     */
    public BaseDto deleteGoodsByPrimayKey(String gid);

    /**
     * 删除实体根据示例
     * @return
     */
    public BaseDto deleteGoodsByExample();
}
